from django.urls import path
from rest_framework_jwt.views  import obtain_jwt_token
from .views import Register, SmsCodeView,LoginCountView,UserCountView,DailyAddUserView,DailyActiveUserView
from .views import *
from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('permission',PermissionViewSet)
router.register('permission_types',PermissionTypeViewSet)


urlpatterns = [
    path('login/',obtain_jwt_token),
    path('register/',Register.as_view()),
    #发送验证码
    path('sms_code/', SmsCodeView.as_view()),
    #登录
    path('logincount/',LoginCountView.as_view()),
    #统计用户信息
    path('total_count/',UserCountView.as_view()),
    #统计日增用户总数
    path('day_increment/',DailyAddUserView.as_view()),
    #统计日活跃用户
    path('day_live/',DailyActiveUserView.as_view())
]

urlpatterns += router.urls